onNestedFling

open fun onNestedFling(@NonNull parent: ViewParent, @NonNull target: View, velocityX: Float, velocityY: Float, consumed: Boolean): Boolean(source)

Request a fling from a nested scroll.

This method signifies that a nested scrolling child has detected suitable conditions for a fling. Generally this means that a touch scroll has ended with a velocity in the direction of scrolling that meets or exceeds the minimum fling velocity along a scrollable axis.

If a nested scrolling child view would normally fling but it is at the edge of its own content, it can use this method to delegate the fling to its nested scrolling parent instead. The parent may optionally consume the fling or observe a child fling.

Return

true if this parent consumed or otherwise reacted to the fling

Parameters

parent

ViewParent that contains the target view.

target

View that initiated the nested scroll

velocityX

Horizontal velocity in pixels per second

velocityY

Vertical velocity in pixels per second

consumed

true if the child consumed the fling, false otherwise